package com.yx.security.core.social;

import org.springframework.social.security.SocialAuthenticationFilter;
import org.springframework.social.security.SpringSocialConfigurer;

/**
 * @author ltb
 **/
public class YxSpringSocialConfigurer extends SpringSocialConfigurer {

    private String filterProcesssUrl;

    public YxSpringSocialConfigurer(String filterProcesssUrl) {
        this.filterProcesssUrl = filterProcesssUrl;
    }

    @Override
    protected <T> T postProcess(T object) {
        SocialAuthenticationFilter filter = (SocialAuthenticationFilter) super.postProcess(object);
        filter.setFilterProcessesUrl(filterProcesssUrl);
        return (T) filter;
    }
}
